<%@ page import="com.lu.pojo.Type" %>
<%@ page import="java.util.List" %>
<%@ page import="com.lu.service.impl.TypeServiceImpl" %><%--
  Created by IntelliJ IDEA.
  User: l
  Date: 2022/8/6
  Time: 11:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"  isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>添加好物</title>
</head>
<body>
    <form action="Goods?opr=add" method="post">
        <input type="hidden" name="uname" value="${currentUser.uname}"/>
        <input type="hidden" name="uid" id="uid" value="${currentUser.uid}">
        <p>
            好物名称: <input type="text" name="gname" id="gname">
        </p>
        <p>
            好物类型:
            <select name="tid">
                <%
                    List<Type> typeList = new TypeServiceImpl().getAllType();
                    request.setAttribute("typeList",typeList);
                %>
                <c:forEach var="type" items="${typeList}">
                    <option value="${type.tid}">${type.tname}</option>
                </c:forEach>
            </select>
        </p>
        <p>
            好物价格: <input type="text" name="price" id="price">
        </p>
        <p>
            好物介绍: <textarea rows="10" cols="60" name="description"></textarea>
        </p>
        <input type="submit" value="提交">
    </form>
</body>
</html>
